<div class="line view_page">


<div class="unit size3of4">
<b><?php echo __('Posted In');?>:</b>
	<?php 
	  if(!isset($listingInformation))
      {
        $html->initHelper("ListingInformation");
        $listingInformation = $this->Html->ListingInformation;
      }
	?>
	<?php echo $listingInformation->showListingCategories($listingData, true);?>
		<?php //echo $html->link($listingData['ListCategory']['name'],'/admin/categories/view/'.$listingData['ListCategory']['id']);?><br />
		
		<b>
		<?php echo __("Added By")?>:</b>
		<?php echo $html->link($listingData['Listing']['poster']['display_name'],'/admin/users/view/'.$listingData['Listing']['poster']['id'],array('class'=>'poster'))?><br /> 
		
		<b>
		<?php echo __("Posted On")?>:</b>
		<?php echo date('Y-m-d',strtotime($listingData['Listing']['created']));?><br/>
				<b><?php echo __('User Reviews')?>:</b>
		<?php echo $listingData['Listing']['review_count'];?><br />
		<?php
			//code to show rating of type user and editor.
			$userRating = $listingData['Listing']['userAvg'];
			$editorRating = $listingData['Listing']['editorialAvg'];
			$userRatingHtml = $rating->display(array('rating'=>$userRating,'tooltip'=>__('User Rating').' '.number_format($userRating,1),'tooltipClass'=>'user_'.$listingData['Listing']['id'].'_'.mt_rand(1,1000)));
			$editorRatingHtml = $rating->display(array('rating'=>$editorRating,'class'=>'editor_rating_star_value', 'parent_class'=>'editor_rating_star_base', 'tooltip'=>__('Editor Rating').' '.number_format($editorRating,1),'tooltipClass'=>'editor_'.$listingData['Listing']['id'].'_'.mt_rand(1,1000)));
		
		
		?>	
		<div class="ratings">
			<b>
			<?php echo __('User Rating')?>:</b> <?php echo $userRatingHtml;?>
			<?php
			//show editorial rating if "disableEditorReviews" config is disabled.
			if(cr('GeneralConfig.disable_editor_reviews') != 1)
			{?>
				<b><?php echo __('Editor Rating');?>:</b>
				<?php echo $editorRatingHtml;?>
			<?php
			}?>
		</div> 
	<div class="info_view_review">
		<?php
			//render element to show custom field info 
			echo $this->element('listing_view_fields',array('ListingModelObj'=>$ListingModelObj,'listingDefaultFields'=>$listingDefaultFields));
		?>
		<div class ='description'>
			<?php
			if(!empty($listingData['Listing']['description']))
			{?>
				<b><?php echo __('Description')?>:</b>
				<?php echo $listingData['Listing']['description'];
			}
			?>
		</div>
		<?php
		//code to show tags 
		$tagData = Set::extract('{n}.tag',$listingData['Listing']['tags']);
		$tagData = implode(',',$tagData); 
		if(!empty($tagData))
		{?>
			<b><?php echo __('Tags');?>:</b>
			<?php echo $tagData;?><br/>
		<?php 
		}?>	
	</div>
</div>	
<div class="unit size1of4">
	<?php echo $html->image($listingData['Listing']['image'],array('thumb'=>array('crop'=>true,'width'=>225,'height'=>168),'class'=>'thumbnail'))?><br />
	<br />
	<?php echo $html->link(__('View images'),array("controller"=>"listing_assets",'action'=>"index",$listingData['Listing']['id']));?>
</div>